import java.util.Scanner;
import java.util.LinkedList;
/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 26727
 * Date: 2024-01-11
 * Time: 15:37
 */
class Task<T> {
    private String description;
    private T details;

    /**给出带两个参数的构造器*/
    /**----------begin--------------*/
    public Task(String description,T details) {
        this.description = description;
        this.details = details;
    }
    /**----------end--------------*/

    public String getDescription() {
        return  description;
    }

    public T getDetails() {
        return details;
    }
    @Override
    public String toString() {
        return "Task{" +
               " description=" + description + '\''+
                ",details=" +details+
                '}';

    }
}
/**待办事项列表类*/
class TodoList<T> {
    /**声明任务列表*/
    private LinkedList<Task<T>> tasks;
    /**初始化列表*/
    public TodoList() {
        this.tasks = new LinkedList<>();
    }
    /**定义public void addTask()方法，添加任务到列表*/
    /**----------begin--------------*/
    public void addTask(String description,T details) {
        Task<T> task = new Task<>(description,details);
        tasks.add(task);
    }
    /**----------end--------------*/
    /**定义public LinkedList getTask()方法，获取所有任务*/
    /**----------begin--------------*/
    public LinkedList<Task<T>> getTask() {
        return tasks;
    }
    /**----------end--------------*/

    /**定义public void printTodoList()方法，打印任务列表*/
    /**----------begin--------------*/
    public void printTodoList() {
        for(Task<T> task : tasks) {
            System.out.println(task);
        }
    }
    /**----------end--------------*/
}

public class Main {
    public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);

    /**创建泛型任务待办事项列表*/
    TodoList<String> stringTodoList = new TodoList<>();
    TodoList<Integer> intTodoList = new TodoList<>();

    String descriptionString = scanner.nextLine();
    String detailsString = scanner.nextLine();
    String descriptionInteger = scanner.nextLine();
    Integer detailInteger = scanner.nextInt();

    /** 添加任务到列表*/
    stringTodoList.addTask(descriptionString,detailsString);

    intTodoList.addTask(descriptionInteger,detailInteger);

    /** 打印任务列表*/
    System.out.println("待办事项列表：");
    stringTodoList.printTodoList();
    intTodoList.printTodoList();
    }
}
